package com.leo.blog.dto;

import java.util.List;

import com.leo.blog.entity.Link;
import com.leo.blog.enums.LinkStateEnum;

public class LinkExecution {
		//结果状态
		private int state;
		//状态标识
		private String stateInfo;
		//链接数量
		private int count;
		//操作(增删改的时候使用)
		private Link link;
		//link列表(查询列表的时候使用)
		private List<Link> linkList;
			
		//构造函数
		public LinkExecution() {
				
		}
			
		//操作失败的时候使用的构造器
		public LinkExecution(LinkStateEnum stateEnum) {
			this.state = stateEnum.getState();
			this.stateInfo = stateEnum.getStateInfo();
		}
			
		//操作成功的时候使用的构造器
		public LinkExecution(LinkStateEnum stateEnum, Link link) {
			this.state = stateEnum.getState();
			this.stateInfo = stateEnum.getStateInfo();
			this.link = link;
		}
			
		//操作成功的时候使用的构造器
		public LinkExecution(LinkStateEnum stateEnum, List<Link> linkList) {
			this.state = stateEnum.getState();
			this.stateInfo = stateEnum.getStateInfo();
			this.linkList = linkList;
		}

		public int getState() {
			return state;
		}

		public void setState(int state) {
			this.state = state;
		}

		public String getStateInfo() {
			return stateInfo;
		}

		public void setStateInfo(String stateInfo) {
			this.stateInfo = stateInfo;
		}

		public int getCount() {
			return count;
		}

		public void setCount(int count) {
			this.count = count;
		}

		public Link getLink() {
			return link;
		}

		public void setLink(Link link) {
			this.link = link;
		}

		public List<Link> getLinkList() {
			return linkList;
		}

		public void setLinkList(List<Link> linkList) {
			this.linkList = linkList;
		}
		
		
}
